<?php
require_once("../connection.php");

$id = $_POST['id'];
$del_type = $_POST['del_type'];

if($del_type == "post"){
$res = mysql_query("UPDATE site_posts SET `del`='1' WHERE `id`='$id'");
if($res) echo mysql_error();
}
else if($del_type == "comments"){
$res = mysql_query("UPDATE site_comments SET `del`='1' WHERE `id`='$id'");
if($res) echo mysql_error();
} 

?>